Home > Use Cases > Retrieving Hosts List

Retrieving Hosts List

A sample SessionToken will be used throughout this use case.
The sample SessionToken will be: e65aedeb-a0e7-440c-8309-1cc0bcd920db

Base URLs are required depending on the version of VM Backup being used. <base_url> for each version is:

V8.x: http://localhost:35113/api

V9.0.x: http://localhost:36015/api

V9.1.x: http://localhost:36013/api/rest

There are three ways how to retrieve the hosts which are currently configured by VM Backup. The client can either retrieve all the available hosts, or the hosts of a specific Hypervisor type. This information is mainly useful when restoring a VM, since the client should provide the Host where the VM is going to be restored to.

The following GET request retrieves a list of all configured HyperV and VMware hosts:

<base_url>/restore-options/available-hosts/e65aedeb-a0e7-440c-8309-1cc0bcd920db

 

The following GET request retrieves a list of all configured HyperV hosts:

<base_url>/restore-options/available-hosts/e65aedeb-a0e7-440c-8309-1cc0bcd920db/HYPERV

 

The following GET request retrieves a list of all configured VMware hosts:

<base_url>/restore-options/available-hosts/e65aedeb-a0e7-440c-8309-1cc0bcd920db/VMware

 

For these examples, the following AltaroHostId will be used:

AltaroHostId: 1013330d-dd91-4be9-b463-fe4c3152ef6b

 

Note: A full list of available API commands can be found here